/**
 * Created by gl on 2017/4/15.
 */
public class Demo1 {
    public static void main(String[] args) {
        java.util.Scanner sc = new java.util.Scanner(System.in);

        while (true) {
            System.out.println("   欢迎使用客服系统");
            System.out.println("===================");
            System.out.println("   1.宽带业务");
            System.out.println("   2.手机业务");
            System.out.println("   3.退出");
            System.out.println("   ==================");
            System.out.println("   请选择：");
            int num = sc.nextInt();
            if (num == 1) {
                while(true){
                    System.out.println("   ============");
                    System.out.println("   1.宽带新装");
                    System.out.println("   2.故障申报");
                    System.out.println("  3. 宽带续费");
                    System.out.println("  4.返回");
                    System.out.println("  ================");
                    System.out.println("  请选择：");
                    int num1 = sc.nextInt();
                    if (num1 == 1) {
                        System.out.println("宽带新装");
                    } else if (num1 == 2) {
                        System.out.println("故障申报");
                    } else if (num1 == 3) {
                        System.out.println("宽带续费");
                    } else if (num1 == 4) {
                        System.out.println("返回菜单");
                        break;
                    } else {
                        System.out.println("选择有误，重新选择：");
                    }
                }
            } else if (num == 2) {
                while(true){
                    System.out.println("   ============");
                    System.out.println("   1.话费查询");
                    System.out.println("   2.手机缴费");
                    System.out.println("  3.流量查询 ");
                    System.out.println("  4.返回");
                    System.out.println("  ================");
                    System.out.println("  请选择：");
                    int num1 = sc.nextInt();
                    if (num1 == 1) {
                        System.out.println("话费查询");
                    } else if (num1 == 2) {
                        System.out.println("手机缴费");
                    } else if (num1 == 3) {
                        System.out.println("流量查询");
                    } else if (num1 == 4) {
                        System.out.println("返回菜单");
                        break;
                    } else {
                        System.out.println("选择有误，重新选择：");
                    }
                    System.out.println("   2.话费咨询");
                }

            } else if (num == 3) {
                System.out.println("安全退出！");
                break;
            } else {
                System.out.println("");
                System.out.println("重新选择");
                System.out.println("");
            }
        }

    }
}
